<template>
  <view v-if="indexDataList.menu.length != 0" class="box">
    <view class="uni-search">
      <view class="input-view" @click="toSearch">
        <image
          src="/static/images/sousuo1.png"
          style="
            position: absolute;
            left: 48rpx;
            top: 40rpx;
            width: 32rpx;
            height: 30rpx;
          "
          mode=""
        ></image>
        <input
          type="text"
          placeholder="搜索商品名称~"
          v-model="searchVal"
          prefixIcon="search"
        />
      </view>
    </view>
    <scroll-view class="uni-class" scroll-x="true">
      <view class="uni-class-view">
        <view
          class="class-1"
          :class="tap == index ? 'class-1-active' : ''"
          v-for="(item, index) in classData"
          :key="index"
          @click="searchShop(item, index)"
          v-if="item.gc_name != null"
          >{{ item.gc_name }}</view
        >
      </view>
    </scroll-view>
    <view class="home-padding"></view>
    <view class="home-swiper" v-if="indexDataList.slide.length > 0">
      <swiper
        :indicator-dots="true"
        style="height: 400rpx"
        :autoplay="true"
        :circular="true"
        indicator-active-color="#fff"
        indicator-color="#999"
        :interval="8000"
        :duration="1500"
      >
        <swiper-item v-for="(item, index) in indexDataList.slide" :key="index">
          <view class="swiper-item">
            <image
              @click="toPage(item, index)"
              :src="item.adv_img"
              mode="aspectFill"
            ></image>
          </view>
        </swiper-item>
      </swiper>
    </view>
    <view class="uni-nav" v-if="indexDataList.menu.length > 0">
      <view class="uni-nav-box">
        <view
          class="uni-nav-box-list"
          v-for="(item, index) in indexDataList.menu"
          :key="index"
          @click="toPage(item, index)"
        >
          <view class="uni-nav-img">
            <image :src="item.adv_img"></image>
          </view>
          <view class="uni-nav-name">{{ item.adv_title }}</view>
        </view>
      </view>
    </view>
    <!-- <view class="uni-adv">
      <image
        :src="indexDataList.adv.adv_img"
        @click="toUrl(indexDataList.adv)"
      ></image>
    </view> -->
    <view
      class="uni-jh-seckill"
      id="miaosha"
      v-if="indexDataList.miaosha.length != 0"
    >
      <view class="jh-seckill-title">
        <view class="title">皖集采秒杀</view>
        <view class="more" @click="toSeckill">
          更多
          <image
            :src="`${picUrl}/jh/more1.png`"
            style="width: 40rpx; height: 40rpx"
            mode=""
          ></image>
        </view>
      </view>
      <view class="flash-view">
        <view
          class="flash-view-list"
          v-for="(item, index) in indexDataList.miaosha"
          :key="index"
          @click="toGoodsDetails(item)"
        >
          <view class="flash-view-img">
            <image :src="item.goods_ur"></image>
          </view>
          <view class="flash-title">{{ item.goods_name }}</view>
          <view v-if="member_id" class="flash-price"
            >￥
            <text class="flash-price-1">{{
              parseFloat(item.goods_price).toFixed(0)
            }}</text>
            <text class="flash-price-2"
              >￥{{ parseFloat(item.max_price).toFixed(0) }}</text
            >
          </view>
          <view v-else class="flash-price">
            <text flash-price-1>￥{{ "登录查看价格" }}</text>
          </view>
        </view>
      </view>
    </view>
    <view
      class="uni-flash"
      id="xianshi"
      v-if="indexDataList.groupbuy.length != 0"
    >
      <view class="jh-seckill-title">
        <view class="title">限时抢购</view>
        <view class="more" style="color: #fff" @click="toGroupbuy">
          更多
          <image
            :src="`${picUrl}/jh/more2.png`"
            style="width: 40rpx; height: 40rpx"
            mode=""
          ></image>
        </view>
      </view>
      <scroll-view class="flash-view" scroll-x="true">
        <view class="flash-view-1">
          <view
            class="flash-view-list"
            v-for="(item, index) in indexDataList.groupbuy"
            :key="index"
            @click="toGoodsDetails(item)"
          >
            <view class="flash-view-img">
              <image :src="item.groupbuy_image"></image>
            </view>
            <view class="flash-title">{{ item.goods_name }}</view>
            <view class="flash-price"
              >￥{{
                member_id
                  ? parseFloat(item.groupbuy_price).toFixed(0)
                  : "登录查看价格"
              }}
            </view>
          </view>
        </view>
      </scroll-view>
    </view>
    <view
      class="uni-good-thing"
      id="zhuanti"
      v-if="indexDataList.specil.goods_list.length != 0"
      style="padding-top: 20rpx"
    >
      <view
        class="jh-seckill-title"
        style="background-color: #fff; padding: 10rpx"
      >
        <view class="title">专题精选</view>
        <view class="more" @click="toSpecil">
          更多
          <image
            :src="`${picUrl}/jh/more1.png`"
            style="width: 40rpx; height: 40rpx"
            mode=""
          ></image>
        </view>
      </view>
      <view class="uni-good-list">
        <view
          class="uni-good-view-list"
          v-for="(item, index) in indexDataList.specil.goods_list"
          :key="index"
          @click="toGoodsDetails(item)"
        >
          <view class="uni-good-view-img">
            <image :src="item.goods_ur" mode="aspectFill"></image>
          </view>
          <view class="good-thing-corner-mark">
            <image
              :src="`${picUrl}/jh/good-3.png`"
              class=""
              mode="aspectFill"
            ></image>
          </view>
          <view class="uni-good-title">{{ item.goods_name }}</view>
          <view class="uni-goods-class">
            <view
              class="uni-class-1"
              v-for="(item1, index1) in item.labels_names"
              :key="index1"
            >
              <span>{{ item1 }}</span>
            </view>
          </view>
          <view
            v-if="member_id"
            class=""
            style="display: flex; align-items: end"
          >
            <text class="uni-good-price"
              >￥{{ item.goods_promotion_price }}</text
            >
            <text
              v-if="
                item.tm_price > 0 && indexDataList.physical_info.is_price == 1
              "
              style="
                text-decoration: line-through;
                font-size: 12px;
                color: #999;
              "
            >
              ￥{{ item.tm_price }}</text
            >
          </view>
          <view v-else>
            <text class="uni-good-price">￥{{ "登录查看价格" }}</text>
          </view>
          <view class="uni-goods-num">
            <view class="uni-goods-stock"
              >库存：{{ item.goods_storage || 0 }}</view
            >
            <view class="uni-goods-volume"
              >销量：{{ item.goods_salenum || 0 }}</view
            >
          </view>
        </view>
      </view>
    </view>
    <view
      class="uni-good-thing"
      id="haowu"
      style="padding-top: 20rpx"
      v-if="indexDataList.new.goods_list.length != 0"
    >
      <view
        class="jh-seckill-title"
        style="background-color: #fff; padding: 10rpx"
      >
        <view class="title">新鲜好物</view>
        <view class="more" @click="toNewGoods">
          更多
          <image
            :src="`${picUrl}/jh/more1.png`"
            style="width: 40rpx; height: 40rpx"
            mode=""
          ></image>
        </view>
      </view>
      <view
        class="uni-good-list"
        v-if="indexDataList.new.goods_list.length > 0"
      >
        <view
          class="uni-good-view-list"
          v-for="(item, index) in indexDataList.new.goods_list"
          :key="index"
          @click="toGoodsDetails(item)"
        >
          <view class="uni-good-view-img">
            <image :src="item.goods_ur" mode="aspectFill"></image>
          </view>
          <view class="good-thing-corner-mark">
            <image :src="`${picUrl}/jh/good-2.png`" class=""></image>
          </view>
          <view class="uni-good-title">{{ item.goods_name }}</view>
          <view class="uni-goods-class">
            <view
              class="uni-class-1"
              v-for="(item1, index1) in item.labels_names"
              :key="index1"
            >
              <span>{{ item1 }}</span>
            </view>
          </view>
          <view
            v-if="member_id"
            class=""
            style="display: flex; align-items: end"
          >
            <text class="uni-good-price"
              >￥{{ item.goods_promotion_price }}</text
            >
            <text
              v-if="
                item.tm_price > 0 && indexDataList.physical_info.is_price == 1
              "
              style="
                text-decoration: line-through;
                font-size: 12px;
                color: #999;
              "
              >￥{{ item.tm_price }}</text
            >
          </view>
          <view v-else>
            <text class="uni-good-price">￥{{ "登录查看价格" }}</text>
          </view>
          <view class="uni-goods-num">
            <view class="uni-goods-stock">库存：{{ item.goods_storage }}</view>
            <view class="uni-goods-volume"
              >销量：{{ item.goods_salenum || 0 }}</view
            >
          </view>
        </view>
      </view>
    </view>

    <!-- <view class="uni-good-thing" style="padding-bottom: 100rpx;" id="xihuan" v-if="goods_list.length!=0">
			<view class="jh-seckill-title" style="background-color: #fff;padding: 10rpx;">
				<view class="title">猜你喜欢</view>
			</view> -->
    <!-- <view class="uni-good-likes">
				<view class="uni-good-likes-view">
					<view class="like-1" :class="index==clickIndex?'like-1-active':''"
						v-for="(item,index) in indexDataList.likes" :key="index" @click="tolike(item,index)">
						{{item.gc_name}}
					</view>
				</view>
			</view> -->
    <!-- <view class="uni-good-list">
				<view class="uni-good-view-list" v-for="(item,index) in goods_list" :key="index"
					@click="toGoodsDetails(item)">
					<view class="uni-good-view-img">
						<image :src="item.goods_image_url"></image>
					</view>
					<view class="uni-good-title">{{item.goods_name}}</view>
					<view class="uni-goods-class">
						<view class="uni-class-1" v-for="(item1,index1) in item.labels_names" :key="index1">
							<span>{{item1}}</span>
						</view>
					</view>
					<view class="" style="display: flex;align-items: end;">
						<text class="uni-good-price">￥{{item.goods_promotion_price}}</text>
						<text
							style="text-decoration: line-through;font-size: 12px;color: #999;">￥{{item.tm_price}}</text>
					</view>
					<view class="uni-goods-num">
						<view class="uni-goods-volume">销量：{{item.goods_salenum || 0}}</view>
					</view>
				</view>
			</view> -->
    <!-- </view> -->
    <go-top :isShow="isShow"></go-top>
  </view>
</template>

<script>
import { globalWxShare_phyid } from "../../common/api_sign/request";
import goTop from "@/components/go-top/go-top.vue";
export default {
  components: {
    goTop,
  },
  data() {
    return {
      tap: 0,
      // top: 50,
      height: 88,
      searchVal: "",
      classData: [
        {
          gc_name: "首页",
        },
      ],
      indexDataList: {
        slide: [],
        menu: [],
        new: {
          goods_list: [],
          adv: {},
        },
        groupbuy: [],
        physical_info: [],
      },
      clickIndex: 0,
      goods_list: [],
      isShow: false,
      top: 0,
      curStartTime: "2023-09-01 10:00:00",
      hour: "00",
      min: "00",
      second: "00",
      curpage: 1,
      hasmore: true,
      member_id: null,
    };
  },
  onPageScroll(res) {
    if (res.scrollTop > 200) {
      this.isShow = true;
    } else {
      this.isShow = false;
    }
  },
  onShow() {
    this.getIndexData();
    setTimeout(() => {
      this.member_id = uni.getStorageSync("api_member_id");
      //  console.log('111',this.member_id);
    }, 100);
    // console.log('111',this.member_id);
  },
  onLoad(e) {
    if (e.share_phyid != null) {
      uni.setStorage({
        key: "share_phyid",
        data: e.share_phyid,
      });
      console.log("onloadshare_phyid = " + e.share_phyid);
    }
  },
  onShareAppMessage(res) {
    //console.log('onShareAppMessage',res);
    return {
      title: "皖集采",
      path: "/main/home/index",
    };
  },
  methods: {
    //获取屏幕高度和节点距离顶部的高度
    getTOP() {
      uni.getSystemInfo({
        success: (res) => {
          this.winHeight = res.windowHeight + "px";
        },
      });
      setTimeout(() => {
        new Promise((resolve) => {
          let query = uni.createSelectorQuery();
          query.select("#header").boundingClientRect();
          query.select("#xihuan").boundingClientRect();
          query.select("#zhuanti").boundingClientRect();
          query.select("#haowu").boundingClientRect();
          query.select("#xianshi").boundingClientRect();
          query.select("#miaosha").boundingClientRect();
          query.exec((res) => {
            resolve(res);
          });
        }).then((res) => {
          this.top = res;
          uni.hideLoading();
        });
      });
    },
    toPage(item, index) {
      let adv_url = item.adv_url;
      if (adv_url.includes("/main/category/classification")) {
        // adv_url	String	/main/category/classification?gc_name=4700
        // 使用正则表达式匹配 gc_id 的值
        let match = adv_url.match(/gc_name=(.+)/);
        if (match) {
          let gc_name = match[1];
          uni.setStorageSync("home_jump_class_page_name_key", gc_name);
        }
        uni.switchTab({
          url: adv_url,
        });
      } else if (adv_url.length) {
        uni.navigateTo({
          url: adv_url,
          fail: (e) => {
            console.log(e);
            uni.switchTab({
              url: adv_url,
            });
          },
        });
      }

      // if (index <= 2) {
      // 	if (item.adv_title == '商品分类') {
      // 		uni.switchTab({
      // 			url: item.adv_url
      // 		})
      // 	} else if (item.adv_title == '体验馆') {
      // 		uni.navigateTo({
      // 			url: "/mainA/home/expHall"
      // 		})
      // 	} else {
      // 		uni.navigateTo({
      // 			url: item.adv_url
      // 		})
      // 	}
      // } else {
      // 	if (this.indexDataList.groupbuy.length == 0 && index == 6) {
      // 		uni.showToast({
      // 			title: '活动未开始！',
      // 			icon: "none"
      // 		})
      // 		return
      // 	}
      // 	if (this.indexDataList.miaosha.length == 0 && index == 7) {
      // 		uni.showToast({
      // 			title: '活动未开始！',
      // 			icon: "none"
      // 		})
      // 		return
      // 	}
      // 	let id = (index * 1 - 2) * 1
      // 	let scrollTop = this.top[id].top
      // 	uni.pageScrollTo({
      // 		scrollTop: scrollTop,
      // 		duration: 200
      // 	});

      // }
    },
    toUrl(item) {
      if (item.adv_title == "优惠券") {
        uni.navigateTo({
          url: "/operation/point/duihuanquan",
        });
      }
      uni.navigateTo({
        url: item.adv_url,
      });
    },
    //头部导航筛选
    searchShop(item, index) {
      if (index == 0) {
        return;
      }
      uni.navigateTo({
        url: `/mall/goods/list?index=${item.gc_name}&thirdid=${item.gc_id}`,
      });
    },
    //搜索
    toSearch() {
      uni.navigateTo({
        url: "/mall/search/search",
      });
    },
    //去往秒杀
    toSeckill() {
      uni.navigateTo({
        url: "/operation/miaosha/list",
      });
    },
    //去往限时抢购
    toGroupbuy() {
      uni.navigateTo({
        url: "/operation/groupBuy/list",
      });
    },
    //去往新商品列表
    toNewGoods() {
      let title = "新鲜好物";
      uni.navigateTo({
        url: `/mall/goods/list?index=${title}`,
      });
    },
    //去往精选商品列表
    toSpecil() {
      let title = "专题精选";
      uni.navigateTo({
        url: `/mall/goods/list?index=${title}`,
      });
    },
    // tolike(item, index) {
    // 	this.clickIndex = index
    // 	this.getLikeGoodsData(item.gc_id)
    // },
    toGoodsDetails(item) {
      uni.navigateTo({
        url: "/mall/goods/info?goods_id=" + item.goods_id,
      });
    },
    async getIndexData() {
      let that = this;
      this.$util
        .request({
          url: "/mobile/index.php?act=index&op=index",
          method: "get",
          data: {
            share_phyid: 41,
          },
        })
        .then(function (res) {
          that.classData = [
            {
              gc_name: "首页",
            },
          ];
          if (res.error_code == 0) {
            that.indexDataList = res.datas;
            let key = Object.keys(that.indexDataList.likes);
            key.forEach((item) => {
              that.classData.push(that.indexDataList.likes[item]);
            });
            that.getLikeGoodsData();
          }
        })
        .then((res) => {
          setTimeout(() => {
            this.getTOP();
          }, 1000);
        });
    },
    getLikeGoodsData() {
      let that = this;
      this.$util
        .request({
          url: "/mobile/index.php?act=goods&op=goods_list",
          method: "get",
          data: {
            gc_id: "",
            curpage: that.curpage,
            share_phyid: 41,
          },
        })
        .then(function (res) {
          if (res.error_code == 0) {
            if (that.hasmore) {
              that.goods_list = that.goods_list.concat(res.datas.goods_list);
            } else {
              that.goods_list = [];
              that.goods_list = res.datas.goods_list;
            }
            console.log();
            that.hasmore = res.datas.paged.hasmore;
            that.$forceUpdate();
          }
        });
    },
  },
  onReachBottom() {
    //下拉加载
    // if (this.hasmore) {
    // 	uni.showLoading({
    // 		title: "加载中"
    // 	})
    // 	this.curpage++
    // 	this.getLikeGoodsData()
    // } else {
    // 	uni.showLoading({
    // 		title: "没有更多数据了",
    // 		icon: "none",
    // 		duration: 1000
    // 	})
    // 	setTimeout(() => {
    // 		uni.hideLoading()
    // 	}, 500)
    // }
    // setTimeout(() => {
    // 	uni.hideLoading()
    // }, 500)
  },
};
</script>

<style lang="less" scoped>
page {
  height: 100%;
  background-color: #fff;
}

.box {
  padding-bottom: 100rpx;
}

.tui-header-box {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 150rpx;
  z-index: 9995;
  display: flex;
  align-items: center;

  .header-text {
    width: 100%;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;

    .header-name {
      font-size: 36rpx;
      font-family: PingFang SC-Semibold, PingFang SC;
      font-weight: 600;
      color: #ffffff;
    }
  }
}

.uni-search {
  background: linear-gradient(315deg, #ea8c1e 0%, #e84a1d 100%);
  // padding-top: 20rpx;
  padding: 20rpx 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  // margin-bottom:180rpx;

  .input-view {
    margin: 0 auto;
    width: 95%;
    height: 70rpx;
    border-radius: 60rpx;
    background-color: #fff;
    font-size: 28rpx;
    display: flex;
    justify-content: flex-start;
    align-items: center;

    input {
      margin-left: 80rpx;
    }
  }
}

.uni-class {
  display: flex;
  flex-direction: row;
  align-items: center;
  background: linear-gradient(315deg, #ea8c1e 0%, #e84a1d 100%);
  height: 100rpx;
  position: fixed;
  top: 90rpx;
  z-index: 1000;
  // padding-top: 50rpx;

  ::-webkit-scrollbar {
    display: none;
  }

  .uni-class-view {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 100%;

    .class-1 {
      width: 200rpx;
      font-size: 28rpx;
      font-family: PingFang SC-Medium, PingFang SC;
      font-weight: 500;
      color: #ffffff;
      padding: 0 30rpx;
      white-space: nowrap;
    }

    .class-1-active {
      font-size: 32rpx;
    }
  }
}
.home-padding {
  padding-top: 180rpx;
}
.home-swiper {
  margin-bottom: 30rpx;
  // padding-top: 180rpx;

  uni-swiper {
    height: 400rpx !important;
  }

  .swiper-item {
    image {
      width: 100%;
      height: 400rpx;
    }
  }
}

.uni-nav {
  padding: 20rpx 36rpx 0;

  .uni-nav-box {
    display: flex;
    flex-wrap: wrap;

    .uni-nav-box-list {
      margin-left: 40rpx;
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-bottom: 32rpx;
      flex: 1;
      width: calc((100% - 130rpx) / 4);
      min-width: calc((100% - 130rpx) / 4);
      max-width: calc((100% - 130rpx) / 4);

      .uni-nav-img {
        width: 100rpx;
        height: 100rpx;

        image {
          width: 100rpx;
          height: 100rpx;
        }
      }

      .uni-nav-name {
        margin-top: 14rpx;
        font-size: 28rpx;
        font-family: PingFang SC-Regular, PingFang SC;
        font-weight: 400;
        color: #323232;
        text-align: center;
      }
    }

    .uni-nav-box-list:nth-child(4n + 1) {
      margin-left: 0rpx;
    }
  }
}

.uni-adv {
  margin-top: 30rpx;
  padding: 0 30rpx;

  image {
    width: 100%;
    height: 215rpx;
  }
}

.uni-jh-seckill {
  margin-top: 30rpx;
  padding: 0 30rpx;

  .jh-seckill-title {
    margin-top: 30rpx;
    display: flex;
    justify-content: space-between;

    .title {
      font-size: 32rpx;
      font-family: PingFang SC-Semibold, PingFang SC;
      font-weight: 600;
      color: #323232;
    }

    .time-down {
      display: flex;
      align-items: center;

      .time {
        font-size: 24rpx;
        font-family: PingFang SC-Semibold, PingFang SC;
        font-weight: 600;
        color: #e96a1d;
      }

      .down {
        margin-left: 14rpx;
        font-size: 10px;
        font-family: PingFang SC-Semibold, PingFang SC;
        font-weight: 600;
        color: #e96a1d;
      }

      .time-1 {
        background-color: #e96a1d;
        color: #fff;
        margin: 0rpx 10rpx;
        padding: 10rpx;
      }
    }
  }

  .flash-view {
    margin-top: 20rpx;
    display: flex;
    justify-content: space-between;
    background: #ffffff;
    border-radius: 15rpx;

    .flash-view-list {
      width: 200rpx;
      padding: 20rpx 0;
      margin-right: 15rpx;

      .flash-view-img {
        width: 200rpx;
        height: 200rpx;

        image {
          width: 200rpx;
          height: 200rpx;
        }
      }

      .flash-title {
        margin-top: 10rpx;
        font-size: 24rpx;
        font-family: PingFang SC-Regular, PingFang SC;
        font-weight: 800;
        color: #323232;
        height: 80rpx;
        line-height: 42rpx;
        word-break: break-all;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
      }

      .flash-price {
        margin-top: 10rpx;
        font-size: 22rpx;
        font-family: PingFang SC-Regular, PingFang SC;
        font-weight: 800;
        color: #fc4514;

        .flash-price-1 {
          font-size: 28rpx;
        }

        .flash-price-2 {
          color: #8b8b8b;
          text-decoration: line-through;
          font-weight: 400;
          margin-left: 10rpx;
        }
      }
    }

    .flash-view-list:last-child {
      margin-right: 20rpx;
    }

    .flash-view-list:first-child {
      margin-left: 20rpx;
    }
  }
}

.uni-flash {
  margin-top: 35rpx;
  padding: 30rpx 30rpx 54rpx;
  background: linear-gradient(180deg, #ea8c1e 0%, #e84a1d 100%);
  opacity: 1;

  .jh-seckill-title {
    margin-top: 30rpx;
    display: flex;
    align-items: center;
    justify-content: space-between;

    .title {
      font-size: 32rpx;
      font-family: PingFang SC-Semibold, PingFang SC;
      font-weight: 600;
      color: #ffffff;
    }

    .time {
      font-size: 24rpx;
      font-family: PingFang SC-Semibold, PingFang SC;
      font-weight: 600;
      color: #ffffff;
    }
  }

  .flash-view {
    margin-top: 30rpx;
    display: flex;
    flex-direction: row;
    height: 370rpx;

    ::-webkit-scrollbar {
      display: none;
    }

    .flash-view-1 {
      display: flex;
      flex-direction: row;
      align-items: center;
      height: 100%;
    }

    .flash-view-list {
      background-color: #fff;
      width: 200rpx;
      padding: 10rpx;
      margin-right: 15rpx;

      .flash-view-img {
        width: 200rpx;
        height: 210rpx;

        image {
          width: 200rpx;
          height: 210rpx;
        }
      }

      .flash-title {
        margin-top: 10rpx;
        font-size: 24rpx;
        font-family: PingFang SC-Regular, PingFang SC;
        font-weight: 800;
        color: #323232;
        height: 80rpx;
        line-height: 42rpx;
        word-break: break-all;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
      }

      .flash-price {
        margin-top: 10rpx;
        font-size: 24rpx;
        font-family: PingFang SC-Regular, PingFang SC;
        font-weight: 400;
        color: #fc4514;
      }
    }

    .flash-view-list:last-child {
      margin-right: 0rpx;
    }
  }
}

.uni-good-thing {
  padding: 0 30rpx;
  background-color: #f5f5f5;

  .jh-seckill-title-like {
    padding-top: 15rpx;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .uni-good-likes {
    margin-top: 30rpx;
    width: 690rpx;
    height: 88rpx;
    background: #ffffff;
    opacity: 1;
    overflow-x: scroll;

    .uni-good-likes-view {
      padding-left: 30rpx;
      height: 88rpx;
      display: flex;
      align-items: center;
      overflow-x: scroll;
      width: 100%;

      .like-1 {
        font-size: 28rpx;
        font-family: Source Han Sans CN-Regular, Source Han Sans CN;
        font-weight: 400;
        color: #333333;
        margin-right: 60rpx;
        white-space: nowrap;
      }

      .like-1-active {
        color: #e96a1d;
      }
    }
  }

  ::-webkit-scrollbar {
    height: 0;
    width: 0;
    color: transparent;
  }

  .jh-seckill-title {
    padding-top: 30rpx;
    display: flex;
    align-items: center;
    justify-content: space-between;

    .title {
      font-size: 32rpx;
      font-family: PingFang SC-Semibold, PingFang SC;
      font-weight: 600;
      color: #323232;
    }
  }

  .good-thing-view {
    position: relative;
    margin-top: 30rpx;

    .good-thing-img {
      width: 100%;
      height: 400rpx;
    }
  }

  .uni-good-list {
    margin-top: 30rpx;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;

    .uni-good-view-list {
      width: 330rpx;
      margin-bottom: 30rpx;
      display: flex;
      flex-direction: column;
      background-color: #fff;
      position: relative;

      .uni-good-view-img {
        width: 330rpx;
        height: 330rpx;

        image {
          width: 330rpx;
          height: 330rpx;
        }
      }

      .good-thing-corner-mark {
        position: absolute;
        top: 0;
        left: 0;
        width: 130rpx;
        height: 130rpx;

        image {
          width: 130rpx;
          height: 130rpx;
        }
      }

      .uni-good-title {
        margin-top: 17rpx;
        padding: 0 24rpx;
        font-size: 28rpx;
        font-family: Source Han Sans CN-Bold, Source Han Sans CN;
        font-weight: bold;
        color: #333333;
        height: 80rpx;
        line-height: 42rpx;
        word-break: break-all;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
      }

      .uni-good-price {
        // margin-top: 24rpx;
        padding: 0 5px 0 24rpx;
        font-size: 26rpx;
        font-family: Source Han Sans CN-Bold, Source Han Sans CN;
        font-weight: bold;
        color: #e96a1d;
      }

      .uni-goods-class {
        margin-top: 14rpx;
        padding: 0 14rpx;
        display: flex;
        justify-content: space-between;

        .uni-class-1 {
          // padding: 0 4rpx;
          border-radius: 2rpx;
          opacity: 1;
          border: 1rpx solid #e96a1d;
          font-size: 24rpx;
          font-family: Source Han Sans CN-Regular, Source Han Sans CN;
          font-weight: 400;
          color: #e96a1d;
          white-space: normal;
          transform: scale(0.9);
        }
      }

      .uni-goods-num {
        margin-top: 13rpx;
        padding: 0 24rpx 20rpx;
        display: flex;
        justify-content: space-between;

        .uni-goods-stock {
          font-size: 24rpx;
          font-family: Source Han Sans CN-Regular, Source Han Sans CN;
          font-weight: 400;
          color: #333333;
        }

        .uni-goods-volume {
          font-size: 24rpx;
          font-family: Source Han Sans CN-Regular, Source Han Sans CN;
          font-weight: 400;
          color: #333333;
        }
      }
    }
  }
}

scroll-view {
  height: 100vh;
}

.GoTop {
  position: fixed;
  bottom: 200rpx;
  right: 40rpx;
  background-color: rgba(200, 200, 200, 0.6);
  width: 80rpx;
  height: 80rpx;
  border-radius: 50%;
  z-index: 999;
}

.more {
  font-size: 13px;
  display: flex;
  align-items: center;
  color: #000;
}
</style>